# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Charles Mauch <cmauch@gmail.com>

pkgname=perl-mail-box-parser-c
pkgver=3.010
pkgrel=4
pkgdesc="Perl/CPAN Module Mail::Box::Parser::C : extends MailBox with the speed of C"
arch=("loong64" "x86_64")
url="https://search.cpan.org/dist/Mail-Box-Parser-C"
license=("GPL" "PerlArtistic")
options=('!emptydirs')
source=("https://www.cpan.org/authors/id/M/MA/MARKOV/Mail-Box-Parser-C-${pkgver}.tar.gz")
sha256sums=('d89067fc0673efded826e79d4665d8bc9182a8759d7d574224f02e9196156b57')

build() {
  cd Mail-Box-Parser-C-${pkgver}

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor

  make
}

package() {
  cd Mail-Box-Parser-C-${pkgver}

  make install DESTDIR="$pkgdir"

  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
